﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Table.aspx.cs" Inherits="Rep_Table" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>仪征</title>

    <script src="../Js/jquery-1.6.2.js" type="text/javascript"></script>

    <style type="text/css">
        .style2
        {
            width: 100%;
        }
    </style>

    <script type="text/javascript">
       $(document).ready(function(){
          load();  
        });
function AutomateWPS(tableid)
{
    try
    {
        var curTbl = document.getElementById(tableid);
        var oXL = new ActiveXObject("ET.Application"); 
        if (oXL == null)
        {
            alert('导出WPS失败，确定是否安装了WPS，浏览器设置是否正确');
        }else{
            //创建AX对象excel 
            var oWB = oXL.Workbooks.Add(); 
            //获取workbook对象 
            var oSheet = oWB.ActiveSheet; 
            //激活当前sheet 
            var Lenr =tableid.rows.length;// curTbl.rows.length;
            //取得表格行数 

            //   oXL.Range("A1:E1").MergeCells = true;  //合并单元格
            //   oSheet.Rows("1:1").Font.Size = 14;   //设置第1行的字体大小
            //   oSheet.Rows("1:2").Font.Bold = true;  //设置第1，2行为粗体
            //   oSheet.Cells(1,1).HorizontalAlignment = 3; //单元格居中
            //   oSheet.Columns("A:A").ColumnWidth = 160;  //设置单元格宽度

            for (i = 0; i < Lenr; i++) 
            { 
                var Lenc = tableid.rows(i).cells.length; 
                //取得每行的列数 
                for (j = 0; j < Lenc; j++) 
                {
                    var cellValue;
                    cellValue = tableid.rows(i).cells(j).innerText;
                    if(j==1 || j==2)
                    {
                        cellValue = "'"+cellValue; //转换为文本格式
                    }  
                    oSheet.Cells(i + 1, j + 1).value = cellValue; 
                } 
            } 
            //设置excel可见属性
            oXL.Visible = true;
        }
    }catch(e){
        alert("导出WPS失败，确定是否安装了WPS");

        oXL = null; 
        oWB = null; 
        oSheet = null;
    }
    //oSheet.Columns.AutoFit; 
    //oXL.UserControl = true;  //wps交由用户控制 很重要
}
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <a href="Index.aspx?name=1&unit=1">报表一</a>
        <br />
        <a href="Index.aspx?name=2&unit=1">报表二</a>
        <br />
        <a href="Index.aspx?name=3&unit=1">报表三</a>
        <br />
        <a href="Index.aspx?name=4&unit=1">报表四</a>
        <br />
        <a href="Index.aspx?name=5&unit=1">报表五</a>
        <br />
        <a href="Index.aspx?name=6&unit=1">报表六</a>
        <br />
        <a href="Index.aspx?name=7&unit=1">报表七</a>
        <br />
        <a href="Index.aspx?name=8&unit=1">报表八</a>
        <br />
        <a href="Index.aspx?name=9&unit=1">报表九</a>
        <br />
        <a href="Index.aspx?name=10&unit=1">报表十</a>
        <br />
        <a href="Index.aspx?name=11&unit=1">报表十一</a>
        <br />
        <a href="Index.aspx?name=12&unit=1">报表十二</a>
        <br />
        <a href="Index.aspx?name=13&unit=1">报表十三</a>
        <br />
        <a href="Index.aspx?name=14&unit=1">报表十四</a>
        <br />
        <a href="Index.aspx?name=15&unit=1">报表十五</a>
        <br />
        <a href="Index.aspx?name=16&unit=1">报表十六</a>
        <br />
        <a href="Index.aspx?name=17&unit=1">报表十七</a>
        <br />
        <a href="Index.aspx?name=18&unit=1">报表十八</a>
        <br />
        <a href="Index.aspx?name=电气主要参数日报表&unit=1">电气主要参数日报表</a>
        <br />
        <br />
        <a href="Index.aspx?name=19&unit=1">技术经济指标日报表</a>
        <br />
        <a href="Index.aspx?name=19&unit=1">技术经济指标日报表</a>
        <br />
        <a href="Index.aspx?name=19&unit=1">技术经济指标日报表</a>
        <br />
        <a href="Index.aspx?name=19&unit=1">技术经济指标日报表</a>
    </form>
    <table class="style2">
        <tr>
            <td rowspan="2">
            </td>
            <td>
                1
            </td>
            <td>
                1
            </td>
            <td>
                2
            </td>
            <td>
                1
            </td>
            <td>
                1
            </td>
            <td>
                1
            </td>
        </tr>
        <tr>
            <td>
                3333
            </td>
            <td>
                333
            </td>
            <td>
                33
            </td>
            <td>
                333
            </td>
            <td>
                333
            </td>
            <td>
                333
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
        </tr>
    </table>
</html>
